<?php
	header("Content-type:text/html;charset=utf-8");
	
	$userPhone = $_GET["userphone"];
	$userPwd = $_GET["userpwd"];
	
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("dickies");
	
	$result = mysql_query("select * from register where userphone='$userPhone' and userpwd='$userPwd'",$conn);
	$rows=mysql_num_rows($result);
	if($rows== 1){
		echo "1";
	}else{
		echo "0";
		mysql_query("insert into register values('$userPhone','$userPwd')",$conn);
		
	}
	//关闭数据库
	mysql_close($conn);
?>